<div class="nav">
    <ul class="layui-nav layui-bg-blue">
        <li class="layui-nav-item nav-item"><a href="/main.html">首页</a></li>
        <li class="layui-nav-item nav-item"><a href="/introduction.html">家政百科</a></li>
        <li class="layui-nav-item nav-item"><a href="/careBaby.html">育婴师</a></li>
        <li class="layui-nav-item nav-item"><a href="/myContract.html">我的合同</a></li>
        <li class="layui-nav-item nav-item"style="width:250px;float: right;" lay-unselect=""><a href="javascript:;"><img src="http://t.cn/RCzsdCq" class="layui-nav-img">${session.cUser.username}</a>
            <dl class="layui-nav-child">
                <dd><a href="/personCenter.html">个人中心</a></dd>
                <dd><a href="/logout.html">退出登录</a></dd>
            </dl>
        </li>
    </ul>
</div>
<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
